<?php
    include_once "conn.php";

    //查询代码
    $sql = "select * from user";
    $query = mysqli_query($conn,$sql);
    while($row = mysqli_fetch_array($query)){
?>
<html>
    <head>
        <title>后台管理系统-用户列表</title>
        <meta charset="utf-8">
        <style>
            ul li{float:left;padding-right:5%;list-style-type:none;}
            ul{clear:both}
        </style>
    </head>
    <body>
        <table>
            <ul>
                <li>ID</li>
                <li>用户名</li>
                <li>所在组</li>
            </ul>
<?php   
            if($row['groups'] ==1){
                $group = '管理员';
            }else{
                $group = '会员';
            }
            echo "<ul><li>".$row['id']."</li><li>".$row['name']."</li><li>".$group."</li></ul>";
    }
?>
        </table>
    </body>
</html>